nwidart-laravel-modules seed

97

to insert seeded data you'll need to define it in module.json
{
    "name": "Rates",
    "alias": "rates",
    .
    .
    .
    "migration": {
        "seeds": [
            "Modules\\Rates\\database\\seeds\\v1\\DatabaseSeeder"
        ]
    }
}
then run command
php artisan module:seed Rates to seed all the seeders defined there or
php artisan module:seed Rates --class=DatabaseSeeder to seed one single seeder.

the key here is to define your seeder classes in module.json

Comments

Submit
0 Comments